package com.sdgakj.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "f_order_flow")
public class OrderFlow extends IdEntity {
	
	private static final long serialVersionUID = 1L;
	/** 订单 */
	private Order order;
	/** 操作人 */
    private Long userId;
    /** 状态(1查看订单 2修改订单 3审核订单 4确认退款 5打款 ) */
	private Integer state;
	/** 描述 */
    private String descp;
	/** 创建时间*/
	private Date createTime;
	
	@ManyToOne()
    @JoinColumn(name = "order_id")
	public Order getOrder() {
		return order;
	}
	public void setOrder(Order order) {
		this.order = order;
	}

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	
    public String getDescp() {
        return descp;
	}

    public void setDescp(String descp) {
        this.descp = descp;
	}
	
	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}
